#include<stdio.h>
int main()
{
	int num;
	scanf_s("%d", &num);
	printf("%d %d %d", num%10,num/10%10,num/100);
	return 0;
}